<?php
// 异常订单,需要仓储部处理,订单备注，或其他情况备注等。
class ExceptionOrderAction extends MessageAction {
    
	public function _filter(&$map){
         parent::_filter($map);
         $map['depart'] = 2 ; //仓库部门
	}

  public function _before_index(){
    $message = M('Message');
    $count_todo = $message->where('status = 0 and depart=2')->count('id');
    $count_doing = $message->where('status = 1 and depart =2')->count('id');
    $count_exception = $message->where('exception_order = 1')->count('id');
    $this->assign('count_todo',$count_todo);
    $this->assign('count_doing',$count_doing);
    $this->assign('count_exception',$count_exception);
  }  
	
  public function index($model,$sort){
      parent::index('Message'); 
  }

  public function reply(){
     $this->edit('Message','reply');     
  }
    
  public function update(){
      A('Message')->update();
      
  }
    
}
?>
